<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
	<!-- 全屏 -->
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<!-- 上方栏显示 -->
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<!-- 不自动识别号码 -->
	<meta name="format-detection" content="telephone=no">
	<!-- Include js plugin -->
	<title>我的学习卡</title>
	<link rel="stylesheet" href="/static/wap/skin/css/layout.css">
	<link rel="stylesheet" href="/static/wap/skin/css/demos.css">
	<link rel="stylesheet" href="/static/wap/weui/css/weui.min.css">
	<link rel="stylesheet" href="/static/wap/weui/css/jquery-weui.min.css">
</head>
<body>
<header class="brB">
	<div class="h_top">
		<div class="hLeft"><a href="/my/home" class="icoH icoReturn mt20"></a></div>
		<div class="hCenter"><span class="tit c-3ac9af">我的学习卡</span></div>
	</div>
</header>
<div class="warp">
	<div class="weui-cells" style="margin: 0;">
      	<a class="weui-cell weui-cell_access" href="/my/learn_card/useing">
        	<div class="weui-cell__bd">
          	<p>激活学习卡</p>
        	</div>
        	<div class="weui-cell__ft">
        	</div>
      	</a>
    </div>
	<div class="pt20">
		
		<ul class="b-FFFFFF">
			<{foreach from=$card_list item=item}>
			<li class="p20 brB">
				<dl class="layout-box">
					<dd class="box-col">
				  		<div>
				  			<span class="fs26"><{$item['title']}></span>
				  			<span class="fs26"><a class="show_card"  style="color:red" href="javascript:;" card_id="<{$item['id']}>" target="_blank">查看可用产品</a></span>
					  		<!-- <span class="fs22 kb_btn_fa3838 r">新作业</span> -->
					  	</div>
					  	<div><span class="fs22 c-666666">卡号：<{$item['card_num']}></span><span class="fs22 c-999999">售价：<{$item['price']}></span></div>
					  	<div class="h40 oh">
					  		<span class="fs22 c-999999">激活时间：<{$item['activation_time']|date_format:'%Y-%m-%d'}>(<{$item['expire_day']}>内天有效)</span>
					  	</div>
					  	<div class="h40 oh">
							<span class="fs22 c-999999">
								过期时间：<{($item['activation_time']+$item['expire_day']*3600*24)|date_format:'%Y-%m-%d'}>
								<span style="color:red">
								<{if $time - ($item['activation_time']+$item['expire_day']*3600*24) >= 0}>
								(已过期)
								</span>
								<{else}>
								<span style="color:green">
								(剩余<{((($item['activation_time']+$item['expire_day']*3600*24)-$time)/(3600*24))|ceil}>天)
								</span>
								<{/if}>
							</span>
					  	</div>
					</dd>
				</dl>
			</li>
			<{/foreach}>
		</ul>
	</div>
</div>
<script src="/static/public/jquery-1.11.1.min.js" type="text/javascript"></script>
<link href="/static/public/layer/src/css/layui.css" rel="stylesheet">
<script src="/static/public/layer/layer.js"></script>
<script>
	$(function(){
		$(".show_card").click(function(){
			var card_id = $(this).attr("card_id");
			if(card_id > 0){
				layer.open({
					type: 2,
					title: '可用产品',
					shadeClose: true,
					shade: 0.8,
					area: ['80%', '80%'],
					maxmin: true,
					content: '/my/learn_card/show_item/'+card_id //iframe的url
				}); 
			}
		})
	})
</script>
</body>
</html>